<%include file="include/head.html"%>
<link rel="stylesheet" type="text/css" href="<%$CSS_DIR%>/jquery.ad-gallery.css">
<link rel="stylesheet" type="text/css" href="<%$CSS_DIR%>/album.css">
<script>
  if (window.sessionStorage)
  window.sessionStorage.clear();
</script>

<div class="wrapper">
  <div id="div-home" class="main-info-box">
    <%include file="include/crumbs.html"%>
    <%include file="include/edit_nav.html"%>   
    <div class="div-info-body">

      <span class="response">成功添加<%$user_created.realname%>！</span>
      <br/>
      <br/>
      <a href="/users/add_figure?userid=<%$user_created.id%>">添加<%$user_created.realname%>的头像</a>
      <a href="/relation/add?userid=<%$user.id%>">继续添加<%$user.realname%>的家人</a>
      <a href="/relation/add?userid=<%$user_created.id%>">添加<%$user_created.realname%>的家人</a>
      <a href="/users/home?userid=<%$user_created.id%>">返回<%$user_created.realname%>的主页</a>
      <%if $relations|@count gt 0 %>
      <div class="">
	<%foreach from=$relations key=userid item=relation%>
	<div id="user_<%$userid%>" class="div-possible-rel user">
	  <%assign var="type" value=$relation.rel_type%>
	  <h4><%$users.$userid%>的<%$rel_types.$type%>是：</h4>
	  <%if $relation.rels|@count gt 0 %>
	  <%foreach from=$relation.rels key=id item=rel%>
	  <dl id="rel_<%$rel.id%>" class="dl-possible-rel rel">
	    <dt><%$rel.realname%></dt>
	    <dd>
	      <button user_id=<%$userid%> rel_id="<%$rel.id%>" rel_type="<%$relation.rel_type%>" class="ym-button add_relation">选择</button>
	      <a user_id=<%$userid%> rel_id="<%$rel.id%>" class="cancel_relation">取消</a>
	    </dd>
	  </dl>
	  <%/foreach%>
	  <%/if%>
	</div>
	<%/foreach%>
      </div>
      <%/if%>
    </div>
    <div class="clear">
    </div>
  </div>
</div>
<script src="<%$JS_DIR%>/request.js"></script>
<%include file="include/bottom.html"%>
